In most computer systems today, the computer is connected to a packet network by a network interface controller (NIC). Upon receiving packets from the network, the NIC issues interrupts to the central processing unit (CPU) of the host computer, to inform the CPU that the packets have arrived and are awaiting service. In computers that handle a large volume of packet communication traffic, the resulting interrupts can place a significant burden on the CPU.
For this reason, many NICs use interrupt moderation in order to reduce the number of interrupts, and thus reduce the load they place on the CPU of the host computer to which they are attached. With interrupt moderation, the NIC hardware does not always generate an interrupt immediately after it receives a packet from the network. Rather, the hardware waits for more packets to arrive, or for a certain time-out to expire, before generating an interrupt. The NIC driver software generally allows the system operator to adjust the interrupt moderation parameters, such as the maximum number of packets and time-out interval between interrupts.
Some NICs offer adaptive interrupt moderation capabilities, which can adjust the interrupt rates dynamically depending on the traffic type and network usage. For example, U.S. Patent Application Publication 2014/0040514 describes a method for adaptive interrupt moderation in which a host device determines a number of connections between the host device and one or more link partners based, at least in part, on a connection identifier associated with each connection. The host device determines a new interrupt rate based at least in part on a number of connections, and updates an interrupt moderation timer with a value related to the new interrupt rate.
As another example, U.S. Patent Application Publication 2014/0006667 describes a method for adaptive hardware interrupt moderation in which the interrupt rate is adjusted based on traffic patterns. One mechanism used in this regard is to track and learn the traffic pattern in real time and dynamically tune various parameters through hardware. Dynamically-tuned parameters include a packet aggregation threshold and a push timer timeout value. Packet aggregation threshold techniques generally involve delaying interrupt generation until a predefined number of packets are received. Push timer timeout techniques generally involve forcing interrupt generation in low packet throughout scenarios if the received number of packets does not cross a threshold in a certain amount of time. One embodiment reduces packet delivery latency in the low packet rate case, while maximizing aggregation count in the high packet rate case.
U.S. Pat. No. 8,566,494 describes an apparatus that performs traffic class-based adaptive interrupt moderation. The apparatus comprises two or more interrupt vectors, and moderation timers associated with the interrupt vectors are set with different interrupt rates. An interrupt vector logic unit sends an interrupt vector if there is an interrupt event from a queue associated with a moderation timer and the moderation timer expires.